package com.javabrains.struts.action;

import com.javabrains.struts.service.TutorialFinderService;

public class TutorialAction {
	private String bestTutorialSite;
	private String language;
	private String lang;

	public String execute() {
		TutorialFinderService tutorialFinderService = new TutorialFinderService();
		this.setBestTutorialSite(tutorialFinderService.getBestTutorialSite(this
				.getLanguage()));
		System.out.println(" " + getLang());
		return "success";
	}

	public String getTutorial() {
		System.out.println("in get tutorial method");
		return "success";
	}

	public String addTutorial() {
		System.out.println("in add tutorial method");
		return "success";
	}

	/**
	 * @return the bestTutorialSite
	 */
	public String getBestTutorialSite() {
		return bestTutorialSite;
	}

	/**
	 * @param bestTutorialSite
	 *            the bestTutorialSite to set
	 */
	public void setBestTutorialSite(String bestTutorialSite) {
		this.bestTutorialSite = bestTutorialSite;
	}

	/**
	 * @return the language
	 */
	public String getLanguage() {
		return language;
	}

	/**
	 * @param language
	 *            the language to set
	 */
	public void setLanguage(String language) {
		this.language = language;
	}

	/**
	 * @return the lang
	 */
	public String getLang() {
		return lang;
	}

	/**
	 * @param lang
	 *            the lang to set
	 */
	public void setLang(String lang) {
		this.lang = lang;
	}

}
